﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Login.aspx.cs" Inherits="Token.Piker.Web.Admin.Login" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Piker网后台管理系统登录页</title>
    <link href="css/reset.css" rel="stylesheet" type="text/css" />
    <link href="css/login.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script src="js/jquery.corner.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#login_Form").corner();
            $("#txtUserName").corner("5px");
            if ($("#txtUserName").val() != "用户名不正确" && $("#txtUserName").val() != "您尚未通过审核") {
                $("#txtUserName").css("color", "#ccc");
                $("#txtUserName").val("请输入用户名");
            }
            $("#txtPassword").corner("5px");
            if($("txtPassword").val() != "密码不正确"){
                $("#txtPassword").css("color", "#ccc");
                $("#txtPassword").val("请输入密码");
                $("#txtPassword").attr("type", "text"); 
            }

            $("#btnLogin").corner("4px");

            $("#txtUserName").focus(function () {
                if ($("#txtUserName").val() == "请输入用户名" || $("#txtUserName").val() == "用户名不正确" || $("txtUserName").val()=="您尚未通过审核") {
                    $("#txtUserName").val("");
                    $("#txtUserName").css("color", "Black");
                };
            });

            $("#txtPassword").focus(function () {
                if ($("#txtPassword").val() == "请输入密码" || $("#txtPassword").val() == "密码不正确") {
                    $("#txtPassword").val("");
                    $("#txtPassword").attr("type", "password");
                    $("#txtPassword").css("color", "Black");
                };
            });

            $("#btnLogin").click(function () {
                if ($("#txtUserName").val().trim() == "") {
                    $("#txtUserName").css("color", "Red");
                    $("#txtUserName").val("请输入用户名");
                    return false;
                }
                if ($("#txtPassword").val().trim() == "") {
                    $("#txtPassword").css("color", "Red");
                    $("#txtPassword").attr("type", "text");
                    $("#txtPassword").val("请输入密码");
                    return false;
                }
                return true;
            });
        });
    </script>
</head>
<body>
    <form id="login_Form" runat="server" defaultbutton = "btnLogin">
    <p>
        <asp:TextBox ID="txtUserName" runat="server" Width="372" Height="30"
                Font-Size="12"></asp:TextBox>
    </p>
    <p>
        <asp:TextBox ID="txtPassword" runat="server" Width="372" Height="30" Font-Size="12" TextMode = "Password"></asp:TextBox></p>
    <p><span style = "float:left"><a href = "Register.aspx">没有账号？点此申请</a></span><span style = "float:right"><asp:Button ID = "btnLogin" runat = "server" Text = "登录" Width = "100" Font-Size = "16"
            Height = "40"  onclick="btnLogin_Click" /></span></p>
    </form>
</body>
</html>
